function[CI] = CI_fun(xvec)

CI_LB = nanmean(nanmean(xvec)) - 1.96*sqrt(nanvar(xvec))/sqrt(length(xvec));
CI_UB = nanmean(nanmean(xvec)) + 1.96*sqrt(nanvar(xvec))/sqrt(length(xvec));

CI=[CI_LB, CI_UB];